﻿namespace Methods
{
    using System;

    public class GreaterThanItsTwoNeighbours
    {
        // 1.1.9.05. Write a method that checks whether an element, from a certain position in an array is greater than
        // its two neighbours. Test whether the method works correctly.

        public static bool IsItGreatThanItsNeighbours(byte position, int[] arry)
        {
            bool isGreater = arry[position] > arry[position - 1] && arry[position] > arry[position + 1];
            return isGreater;
        }
        static void Main()
        {
            byte certainPosition = byte.Parse(Console.ReadLine());
            int[] arr = { 1, 3, 5, 1, 5, 6, 3, 1, 3, 1, 5, 6, 7, 11, 3, 0 };
            Console.WriteLine(IsItGreatThanItsNeighbours(certainPosition, arr));
        }
    }
}